﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterALSafa.Master" AutoEventWireup="true"
    CodeBehind="TE_Show_Question.aspx.cs" Inherits="School.Pages.Teaching.TE_Show_Question" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.prettyPhoto.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        var refresh = true;
        $(document).ready(function () {
            $(".Grid a[rel^='prettyphoto']").prettyPhoto({
                theme: 'facebook',
                default_width: 850,
                default_height: 450,
                allowresize: false,
                callback: function () { if (refresh) $(".btnSearch").click(); else refresh = true; }
            });
        });
        function closeMe() {
            refresh = true;
            $.prettyPhoto.close();
        }
        $(function () { $(".grid tr").hover(function () { $(this).toggleClass("highlight"); }) });
    </script>
    <div style="padding: 10PX">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
        </div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div>
                    <div>
                        المجمع
                    </div>
                    <div>
                        <asp:DropDownList ID="ddlCampus" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                            DataTextField="Name" DataValueField="Id" OnTextChanged="ddlCampus_TextChanged"
                            Width="150px">
                            <asp:ListItem Value="0">اختيار</asp:ListItem>
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="ddlCampus"
                            Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator>
                    </div>
                    <div>
                        الشهاده
                    </div>
                    <div>
                        <asp:DropDownList ID="ddlCertificate" runat="server" AppendDataBoundItems="True"
                            AutoPostBack="True" DataTextField="Name" DataValueField="Id" OnSelectedIndexChanged="ddlCertificate_SelectedIndexChanged"
                            Width="150px" TabIndex="1">
                            <asp:ListItem Value="0">اختيار</asp:ListItem>
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="ddlCertificate"
                            Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator></div>
                    <div>
                        المرحله
                    </div>
                    <div>
                        <asp:DropDownList ID="ddlStadge" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                            DataTextField="Name" DataValueField="Id" OnSelectedIndexChanged="ddlStadge_SelectedIndexChanged"
                            Width="150px" TabIndex="2">
                            <asp:ListItem Value="0">اختيار</asp:ListItem>
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="ddlStadge"
                            Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator></div>
                    <div>
                        الصف
                    </div>
                    <div>
                        <asp:DropDownList ID="ddlGrade" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                            DataTextField="Name" DataValueField="Id" OnSelectedIndexChanged="ddlGrade_SelectedIndexChanged"
                            Width="150px" TabIndex="3">
                            <asp:ListItem Value="0">اختيار</asp:ListItem>
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="ddlGrade"
                            Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator></div>
                    <div>
                        الطالب
                    </div>
                    <div>
                        <asp:DropDownList ID="ddlstudent" runat="server" AppendDataBoundItems="True" DataTextField="FullName"
                            DataValueField="Id" Width="150px" TabIndex="4" AutoPostBack="True" OnSelectedIndexChanged="ddlstudent_SelectedIndexChanged">
                            <asp:ListItem Value="0">اختيار</asp:ListItem>
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="ddlstudent"
                            Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator></div>
                </div>
                <div>
                    المواد
                </div>
                <div>
                    <asp:DropDownList ID="ddlSubjects" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                        DataTextField="Subject_Name" DataValueField="Id" OnSelectedIndexChanged="ddlSubjects_SelectedIndexChanged"
                        Width="150px">
                        <asp:ListItem Value="0">اختيار</asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" ControlToValidate="ddlSubjects"
                        Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st">*</asp:RequiredFieldValidator>
                </div>
                <div>
                    الوحدة
                </div>
                <div style="float: right; padding: 0px 5px">
                    <asp:DropDownList ID="ddlCourse" runat="server" AppendDataBoundItems="True" DataTextField="Course_Name"
                        DataValueField="Id" Width="150px">
                        <asp:ListItem Value="0">اختيار</asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ControlToValidate="ddlCourse"
                        Display="Dynamic" ErrorMessage="*" ForeColor="Red" InitialValue="0" ValidationGroup="st"></asp:RequiredFieldValidator>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <div style="padding: 10PX">
        <asp:Button ID="btnsearch" runat="server" CssClass="graybutton btnSearch" OnClick="btnsearch_Click"
            Text="عرض" ValidationGroup="st" />
    </div>
    <div>
        <asp:GridView ID="gvBank_Qin" runat="server" AllowPaging="True" AlternatingRowStyle-CssClass="GridItemAltername"
            AutoGenerateColumns="False" CssClass="Grid" DataKeyNames="Id" FooterStyle-CssClass="GridHeaderFooter"
            HeaderStyle-CssClass="GridHeaderFooter" PagerStyle-CssClass="GridPager" Width="80%"
            OnPageIndexChanging="gvBank_Qin_PageIndexChanging">
            <AlternatingRowStyle CssClass="GridItemAltername" />
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        م
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%# Container.DataItemIndex + 1 %>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="الــدرس" SortExpression="Topic_Name">
                    <EditItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("Topic_Name") %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <a rel="prettyPhoto[iframe]" href='<%#Eval("Id","TE_Topic_Content.aspx?id={0}&iframe=true")%>'>
                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("Topic_Name") %>'></asp:Label>
                        </a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="الإجابات">
                    <ItemTemplate>
                        <asp:HyperLink ID="hpDisplay" runat="server" rel="prettyPhoto[iframe]" NavigateUrl='<%#Eval("Id","TE_Student_Question.aspx?id={0}&iframe=true")%>'>استعراض</asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle CssClass="GridHeaderFooter" />
            <HeaderStyle CssClass="GridHeaderFooter" />
            <PagerStyle CssClass="GridPager" />
        </asp:GridView>
    </div>
</asp:Content>
